//package org.vz;
//
//import ca.uhn.fhir.context.FhirContext;
//import org.hl7.fhir.instance.model.api.IBaseResource;
//
//import java.io.ByteArrayInputStream;
//import java.io.InputStreamReader;
//import java.io.Reader;
//
///**
// * @author chj
// * @date 2019/11/5
// * @description
// */
//public class FhirR4 {
//    public static void main(String[] args) {
//        FhirContext CTX = FhirContext.forR4();
//        String xml="<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
//                "<CodeSystem xmlns=\"http://hl7.org/fhir\" xmlns:ns2=\"http://www.w3.org/1999/xhtml\">\n" +
//                "    <id value=\"place-death\"/>\n" +
//                "    <meta>\n" +
//                "        <lastUpdated value=\"2049-01-01T12:00:00.000+08:00\"/>\n" +
//                "    </meta>\n" +
//                "    <url value=\"http://terminology.hl7fhir.cn/WS/api/CodeSystem/place-death\"/>\n" +
//                "    <identifier>\n" +
//                "        <use value=\"official\"/>\n" +
//                "        <system value=\"urn:oid:2.16.156.10011.2.3.1.3\"/>\n" +
//                "        <value value=\" \"/>\n" +
//                "    </identifier>\n" +
//                "    <identifier>\n" +
//                "        <use value=\"official\"/>\n" +
//                "        <system value=\"urn:oid:2.16.156.10011.2.3.1.4\"/>\n" +
//                "        <value value=\" \"/>\n" +
//                "    </identifier>\n" +
//                "    <version value=\"V1\"/>\n" +
//                "    <name value=\"place-death\"/>\n" +
//                "    <title value=\"死亡地点类别代码表\"/>\n" +
//                "    <status value=\"active\"/>\n" +
//                "    <jurisdiction>\n" +
//                "        <coding>\n" +
//                "            <system value=\"http://terminology.hl7fhir.cn/WS/api/CodeSystem/China-area\"/>\n" +
//                "            <code value=\"156\"/>\n" +
//                "        </coding>\n" +
//                "        <text value=\"中国\"/>\n" +
//                "    </jurisdiction>\n" +
//                "    <content value=\"complete\"/>\n" +
//                "    <count value=\"8\"/>\n" +
//                "    <concept>\n" +
//                "        <code value=\"01\"/>\n" +
//                "        <display value=\"医院病房\"/>\n" +
//                "        <definition value=\"医院病房\"/>\n" +
//                "    </concept>\n" +
//                "    <concept>\n" +
//                "        <code value=\"02\"/>\n" +
//                "        <display value=\"急诊室\"/>\n" +
//                "        <definition value=\"急诊室\"/>\n" +
//                "    </concept>\n" +
//                "    <concept>\n" +
//                "        <code value=\"03\"/>\n" +
//                "        <display value=\"家中\"/>\n" +
//                "        <definition value=\"家中\"/>\n" +
//                "    </concept>\n" +
//                "    <concept>\n" +
//                "        <code value=\"04\"/>\n" +
//                "        <display value=\"外地\"/>\n" +
//                "        <definition value=\"外地\"/>\n" +
//                "    </concept>\n" +
//                "    <concept>\n" +
//                "        <code value=\"05\"/>\n" +
//                "        <display value=\"家庭病床\"/>\n" +
//                "        <definition value=\"家庭病床\"/>\n" +
//                "    </concept>\n" +
//                "    <concept>\n" +
//                "        <code value=\"06\"/>\n" +
//                "        <display value=\"敬老院\"/>\n" +
//                "        <definition value=\"敬老院\"/>\n" +
//                "    </concept>\n" +
//                "    <concept>\n" +
//                "        <code value=\"07\"/>\n" +
//                "        <display value=\"来院已死\"/>\n" +
//                "        <definition value=\"来院已死\"/>\n" +
//                "    </concept>\n" +
//                "    <concept>\n" +
//                "        <code value=\"99\"/>\n" +
//                "        <display value=\"其他\"/>\n" +
//                "        <definition value=\"其他\"/>\n" +
//                "    </concept>\n" +
//                "</CodeSystem>\n";
//
//        Reader reader = new InputStreamReader(new ByteArrayInputStream(xml.getBytes()));
//        IBaseResource resource = CTX.newXmlParser().parseResource(reader);
//        String json = CTX.newJsonParser().encodeResourceToString(resource);
//        System.out.println(json);
//    }
//}
